package com.feeyo.groundservice.composewidget.usage

import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.ui.unit.dp
import com.feeyo.groundservice.base_util.toastCenter
import com.feeyo.groundservice.composewidget.usage.base.BaseComposeActivity
import com.feeyo.groundservice.composewidget.view.button.CustomRadioButton
import com.feeyo.groundservice.composewidget.view.button.RadioButton
import com.feeyo.groundservice.composewidget.view.util.VerticalSpace

/**
 *作者：70893 on 2025-04-24
 *描述：
 */
class ButtonActivity : BaseComposeActivity() {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        initView()
    }


    private fun initView() {
        setContent {
            Column {

                RadioButton(
                    title = listOf("男", "女", "1", "2", "测试"),
                    defaultSelectIndex = 0,
                    onCheckIndex = {
                        toastCenter("选中了 $it")
                    }
                )
                VerticalSpace(20.dp)
                CustomRadioButton(
                    title = listOf("男", "女", "1", "2", "测试"),
                    defaultSelectIndex = 0,
                    iconSize = 15.dp,
                    space = 10.dp,
                    onCheckIndex = {
                        toastCenter("选中了 $it")
                    }
                )
            }
        }
    }
}